package StructuralPattern.Composite;

public class Client {
    public static void main(String[] args) {
        Folder folder1 = new Folder("Michael的资料");
        Folder folder2 = new Folder("图像文件");
        Folder folder3 = new Folder("文本文件");
        Folder folder4 = new Folder("视频文件");

        ImageFile file1 = new ImageFile("图像1");
        ImageFile file2 = new ImageFile("图像2");
        TextFile file3 = new TextFile("文本1");
        TextFile file4 = new TextFile("文本2");
        VideoFile file5 = new VideoFile("视频1");

        folder2.add(file1);
        folder2.add(file2);
        folder3.add(file3);
        folder3.add(file4);
        folder4.add(file5);
        folder1.add(folder2);
        folder1.add(folder3);
        folder1.add(folder4);

        folder1.killVirus();
    }
}
